
public class JniTest{

    //step 1 load library
    static{
	try {
	    System.loadLibrary("native_jni");
	} catch(Exception e){
	    e.printStackTrace();
	}
    }
    //step 2 add native method to call c method
    public static native int sum_c(int a,int b);

    public static void main (String[] args) {
	System.out.println("hello jni");    
	System.out.println("sum_c = " + sum_c(7,2));    
    }
}
